
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<!--头部样式-->
<head th:fragment="head(title)">
    <meta charset="UTF-8">
    <meta name="viewport" id="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!--    <meta charset="viewport" content="width=device-width,initial-scale=1.0">-->
    <title th:replace="${title}">首页</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
    <script src="//cdn.jsdelivr.net/npm/jquery.scrollto@2.1.2/jquery.scrollTo.min.js"></script>
    <link rel="stylesheet" href="../../static/lib/editormd/css/editormd.min.css" th:href="@{/lib/editormd/css/editormd.min.css}" />
    <link rel="stylesheet" href="../static/css/typo.css" th:href="@{/css/typo.css}"/>
    <link rel="stylesheet" href="../static/css/animate.css" th:href="@{/css/animate.css}"/>
    <link rel="stylesheet" href="../static/lib/prism/prism.css" th:href="@{/lib/prism/prism.css}"/>
    <link rel="stylesheet" href="../static/lib/tocbot/tocbot.css" th:href="@{/lib/tocbot/tocbot.css}"/>
    <script src="../static/lib/live2d/waifu-tips.js" th:src="@{/lib/live2d/waifu-tips.js}"></script>
    <link rel="stylesheet" href="../static/css/main.css" th:href="@{/css/main.css}"/>
</head>
<body>

<!--导航-->
<nav th:fragment="menu(n)" class="ui inverted attached segment m-padded-tb-mini">
    <div class="ui container">
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui blue header item">管理后台</h2>
            <a href="#" th:href="@{/admin/blogs}" class="m-item item m-mobile-hide" th:classappend="${n==1}?'active'"><i class="home icon"></i>文章管理</a>
            <a href="#" th:href="@{/admin/types}" class="m-item item m-mobile-hide" th:classappend="${n==2}?'active'"><i class="idea icon"></i>分类管理</a>
            <a href="#" th:href="@{/admin/tags}" class="m-item item m-mobile-hide" th:classappend="${n==3}?'active'"><i class="tags icon"></i>标签管理</a>
            <a href="#" th:href="@{/}" class="m-item item m-mobile-hide" ><i class="user outline icon"></i><spa>前端</spa></a>
            <div class="right m-item item m-mobile-hide menu">
                <div class="ui dropdown item">
                    <div class="text">
                        <img src="../../static/images/bg.jpg" th:src="@{${session.user.avatar}}" alt="" class="ui avatar image" style="width: 30px;height: 30px;" />
                        <span th:text="${session.user.username}"></span>
                    </div>
                    <i class="dropdown icon"></i>
                    <div class="menu">
                        <a href="#" th:if="${session.user!=null}" th:href="@{/personal}" class="item"><i class="user icon"></i>个人中心</a>
                        <a href="#" th:if="${session.user!=null}" th:href="@{/admin/logout}" class="item"><i class="sign out alternate icon"></i>注销</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <a href="#" class="ui menu toggle black icon button m-right-top m-mobile-show">
        <i class="sidebar icon"></i>
    </a>
</nav>

<!--底部样式-->
<footer th:fragment="footer" class="ui inverted vertical segment  m-padded-tb-massive m-opacity-mini">
    <div class="ui center aligned container">
        <div class="ui inverted divided stackable grid">
            <div class="three wide column">
                <div class="ui inverted link list">
                    <div class="item">
                        <div style="font-size: large;font-weight: bold"
                             class="ui inverted header  m-text-thin m-text-spaced ">本站信息
                        </div>
                        <!--<p id="htmer_time" class="item m-text-thin"></p>-->
                        <div id="blog-message">
                            <div class="ui inverted link list" th:fragment="blogMessage">
                                <div class="m-text-thin">
                                    文章总数：
                                    <h2 class="ui orange header m-inline-block m-margin-top-null"
                                        style="font-size:medium;" th:text="${blogTotal}"> 14 </h2> 篇
                                </div><br>
                                <div class="m-text-thin">
                                    浏览总数：
                                    <h2 class="ui orange header m-inline-block m-margin-top-null"
                                        style="font-size:medium;" th:text="${blogViewTotal}"> 14 </h2> 次
                                </div><br>
                                <div class="m-text-thin">
                                    评论总数：
                                    <h2 class="ui orange header m-inline-block m-margin-top-null"
                                        style="font-size:medium;" th:text="${blogCommentTotal}"> 14 </h2> 条
                                </div>
                                <!--                                <div class="m-text-thin">-->
                                <!--                                    留言总数：-->
                                <!--                                    <h2 class="ui orange header m-inline-block m-margin-top-null"-->
                                <!--                                        style="font-size:medium;"> 14 </h2> 条-->
                                <!--                                </div>-->
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="five wide column">
                <h4 class="ui inverted header inverted header m-text-thin m-text-spaced">七律·长征</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item">红军不怕远征难，万水千山只等闲。</a><br/>
                    <a href="#" class="item">五岭逶迤腾细浪，乌蒙磅礴走泥丸。</a><br/>
                    <a href="#" class="item">金沙水拍云崖暖，大渡桥横铁索寒。</a><br/>
                    <a href="#" class="item">更喜岷山千里雪，三军过后尽开颜。</a>
                </div>
            </div>

            <div class="three wide column">
                <h4 class="ui inverted header inverted header m-text-thin m-text-spaced">联系我</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item" th:text="#{email}"></a>
                    <a href="#" class="item" th:text="#{qq}"></a>
                </div>
            </div>
            <div class="five wide column">
                <h4 class="ui inverted header m-text-thin m-text-spaced">博客介绍</h4>
                <div class="ui inverted link list" style="text-align: left">
                    <p href="#" class="item ">前端功能：博客列表，博客详情（可以评论），博客</p>
                    <p href="#" class="item">分类，博客标签，博客归档</p>
                    <p href="#" class="item">后端功能：博客管理，分类管理，标签管理</p>
                    <p href="#" class="item">辅助功能：登录，注册，个人中心，修改/重置密码</p>
                    <p href="#" class="item">未来打算：添加留言，相册功能，数据持久层使用</p>
                    <p href="#" class="item">mybatis重新编写</p>
                </div>
            </div>
        </div>
        <div class="ui inverted section divider"></div>
        <div style="color: #F08047;margin-top: -18px" class="ui inverted m-text-thin m-text-spaced">我的博客已经运行：<span
                id="htmer_time" class="item m-text-thin"></span></div>
        <p class="m-text-thin m-text-spaced m-opacity-mini">Copyright © 2019-2020 Blog Designedn by ZhangXin</p>
    </div>

</footer>

<th:block th:fragment="script">
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
    <script type="text/javascript" src="../../static/lib/editormd/editormd.min.js" th:src="@{/lib/editormd/editormd.min.js}"></script>
    <script src="../static/lib/live2d/autoload.js" th:src="@{/lib/live2d/autoload.js}"></script>
    <script src="../static/lib/live2d/live2d.min.js" th:src="@{/lib/live2d/live2d.min.js}"></script>
    <script src="../static/lib/live2d/waifu-tips.js" th:src="@{/lib/live2d/waifu-tips.js}"></script>
    <script src="../static/js/time.js" th:src="@{/js/time.js}"></script>
    <script>
        $('#blog-message').load(/*[[@{/admin/footer/blogmessage}]]*/"/admin/footer/blogmessage");
    </script>
</th:block>
</body>
</html>